<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%--引入jstl的命名空间 标签以c开头--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Index Page</title>
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="./static/layui/css/layui.css" rel="stylesheet">
    <link href="/static/css/MessageList.css" rel="stylesheet">
    <script src="/static/js/jquery.min.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>
    <script src="/static/layui/js/layui.js"></script>
</head>

<body>
<div class="container">
    <form class="layui-form" action="" method="post">
        <div class="layui-form-item">
            <div class="layui-input-group search-input">
                <div class="layui-input-prefix">
                    搜索
                </div>
                <input type="search" name="search" placeholder="请输入你需要查找的内容" class="layui-input">
                <div class="layui-input-split layui-input-suffix" style="cursor: pointer;">
                    <i class="layui-icon layui-icon-search"></i>
                </div>
            </div>
<%--            <div class="layui-input-group index-btn">--%>
<%--                <a href="/index.jsp" class="layui-btn">回到首页</a>--%>
<%--            </div>--%>
        </div>
    </form>
    <table class="table table-bordered">
        <thead>
        <tr>
            <th>选项</th>
            <th>ID</th>
            <th>标题</th>
            <th>日期</th>
            <th>类型</th>
            <th>内容</th>
<%--            <th>作者ID</th>--%>
            <th>作者</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${MessageTableList}" var="MessageTable">
            <tr>
                <td>
                    <input class="form-check-input" type="checkbox">
                </td>
                <td>${MessageTable.mid}</td>
                <td>${MessageTable.mtitle}</td>
                <td>${MessageTable.mdate}</td>
                <td>${MessageTable.mtype}</td>
                <td>${MessageTable.mcontent}</td>
<%--                <td>${MessageTable.id}</td>--%>
                <td>${MessageTable.username}</td>
                <td>
                    <a href="/MessageOpeate?mid=${MessageTable.mid}&act=0" class="btn">详情</a>
                    <a href="/MessageOpeate?mid=${MessageTable.mid}&act=1" class="btn">修改</a>
                    <a href="/DeleteMessage?mid=${MessageTable.mid}" class="btn">删除</a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="pagination-body">
        <ul class="pagination justify-content-center">
            <li class="page-item"><a class="page-link" href="javascript:void(0);">Previous</a></li>
            <li class="page-item"><a class="page-link" href="javascript:void(0);">1</a></li>
            <li class="page-item"><a class="page-link" href="javascript:void(0);">2</a></li>
            <li class="page-item"><a class="page-link" href="javascript:void(0);">Next</a></li>
        </ul>
    </div>
</div>

</body>

</html>